Skip to content

nix develop: Version the JSON#13947

Open
edolstra wants to merge 1 commit intomasterfrom
nix-develop-cleanups
Open

nix develop: Version the JSON#13947
edolstra wants to merge 1 commit intomasterfrom
nix-develop-cleanups

Conversation

@edolstra
Copy link
Member

@edolstra edolstra commented Sep 9, 2025

Motivation

This adds a version: 1 field to the JSON environment file created by nix develop. Since these are not just internal (they are exposed by nix develop --profile and nix develop <storepath>) and could even be pushed to binary caches etc, it's good to future-proof them.

Also some miscellaneous cleanups like using Store::getFSAccessor().

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added the new-cli Relating to the "nix" command label Sep 9, 2025

__dumpEnv() {
printf '{\n'
printf ' "version": 1,\n'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not opposing to have this, but have you have a more concrete motivation for this change i.e. can you elaborate how "could even be pushed to binary caches" would be used? Afaik mkShell is buildable and can be already pushed to a binary cache. You removed the the version 1 from flakes again for the reason that a "v2" would be the first explicit version and before everything is "v1".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think some docs would be good. For example, the JSON schema I've been doing would be good for this. I think it is OK if we ret-con version 1 to either have no version, or have version = 1, however. And then version 2 can wait for a more "meaningful" breaking change.

@Ericson2314 Ericson2314 force-pushed the nix-develop-cleanups branch 3 times, most recently from 22e2c08 to 9fc7e35 Compare November 10, 2025 18:08
@Ericson2314
Copy link
Member

The cleanups will be merged in #14530. The version change itself awaits some more documentation/comments/whatever to address @Mic92's point.

@Ericson2314 Ericson2314 changed the title nix develop: Version the JSON + some cleanups nix develop: Version the JSON Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants